let http = require('http');
let fs = require('fs');


http.createServer((req,res) => {
    res.writeHead(200,{'conyent-Type':'text/plain'});
    // 非阻塞执行
    fs.readFile('index.txt',(err,res1) => {
        if(err) {
            return console.log(err);
        }
        console.log(res1.toString());
        res.end(res1.toString());
    })
}).listen(8888)